package lumis.portal.htmlevaluation;

import java.net.URL;
import java.rmi.UnexpectedException;
import java.util.List;

import lumis.portal.htmlevaluation.HtmlEvaluationMessage.Level;

/**
 * <p>Allows to evaluate an URL or HTML content according 
 * with the accessibility roles.</p>
 * 
 * <p>For evaluation of an URL, its possible evaluate, both External
 * URL and Portal URL.<br>
 * For Portal URL, is necessary to inform the user session ID.</p>
 * 
 * @version $Revision: 13093 $ $Date: 2011-05-28 18:40:18 -0300 (Sat, 28 May 2011) $
 * @since 6.0.0
 */
public interface IHtmlEvaluationManager
{

	/**
	 * Makes the Evaluation for a specific URL. If the URL is an external
	 * URL, the <code>userSessionId</code> can be null. Otherwise, the userSessionId
	 * must be informed.
	 * 
	 * @param level Minimal level to be considered.
	 * @param url URL to be evaluated.
	 * @param userSessionId user session ID. This information can be null if the URL is
	 * a external URL.
	 * @return list of messages founded for the URL.
	 * @since 6.0.0
	 */
	public List<HtmlEvaluationMessage> evaluate(Level level, URL url, String userSessionId) throws UnexpectedException;

	
	/**
	 * Makes the Evaluation for a HTML content passed as parameter. 
	 * 
	 * @param level Minimal level to be considered.
	 * @param html HTML content to be evaluated.
	 * @return list of messages founded for the URL.
	 * @since 6.0.0
	 */
	public List<HtmlEvaluationMessage> evaluate(Level level, String html);

}